\(\int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx\) [57]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F(-1)]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 28, antiderivative size = 212 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx=\frac {2 a^{5/2} c^3 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^3 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^4 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {6 a^6 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}-\frac {2 a^7 c^3 \tan ^9(e+f x)}{9 f (a+a \sec (e+f x))^{9/2}} \]

[Out]

2*a^(5/2)*c^3*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))/f-2*a^3*c^3*tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/2
)+2/3*a^4*c^3*tan(f*x+e)^3/f/(a+a*sec(f*x+e))^(3/2)-2/5*a^5*c^3*tan(f*x+e)^5/f/(a+a*sec(f*x+e))^(5/2)-6/7*a^6*
c^3*tan(f*x+e)^7/f/(a+a*sec(f*x+e))^(7/2)-2/9*a^7*c^3*tan(f*x+e)^9/f/(a+a*sec(f*x+e))^(9/2)

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3989, 3972, 472, 209} \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx=\frac {2 a^{5/2} c^3 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f}-\frac {2 a^7 c^3 \tan ^9(e+f x)}{9 f (a \sec (e+f x)+a)^{9/2}}-\frac {6 a^6 c^3 \tan ^7(e+f x)}{7 f (a \sec (e+f x)+a)^{7/2}}-\frac {2 a^5 c^3 \tan ^5(e+f x)}{5 f (a \sec (e+f x)+a)^{5/2}}+\frac {2 a^4 c^3 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}-\frac {2 a^3 c^3 \tan (e+f x)}{f \sqrt {a \sec (e+f x)+a}} \]

[In]

Int[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^3,x]

[Out]

(2*a^(5/2)*c^3*ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]])/f - (2*a^3*c^3*Tan[e + f*x])/(f*Sqrt[a
 + a*Sec[e + f*x]]) + (2*a^4*c^3*Tan[e + f*x]^3)/(3*f*(a + a*Sec[e + f*x])^(3/2)) - (2*a^5*c^3*Tan[e + f*x]^5)
/(5*f*(a + a*Sec[e + f*x])^(5/2)) - (6*a^6*c^3*Tan[e + f*x]^7)/(7*f*(a + a*Sec[e + f*x])^(7/2)) - (2*a^7*c^3*T
an[e + f*x]^9)/(9*f*(a + a*Sec[e + f*x])^(9/2))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 472

Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegr
and[(e*x)^m*((a + b*x^n)^p/(c + d*x^n)), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[n
, 0] && IGtQ[p, 0] && (IntegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])

Rule 3972

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[-2*(a^(m/2 +
 n + 1/2)/d), Subst[Int[x^m*((2 + a*x^2)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 3989

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Di
st[((-a)*c)^m, Int[Cot[e + f*x]^(2*m)*(c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x]
&& EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !(IntegerQ[n] && GtQ[m - n, 0])

Rubi steps \begin{align*} \text {integral}& = -\left (\left (a^3 c^3\right ) \int \frac {\tan ^6(e+f x)}{\sqrt {a+a \sec (e+f x)}} \, dx\right ) \\ & = \frac {\left (2 a^6 c^3\right ) \text {Subst}\left (\int \frac {x^6 \left (2+a x^2\right )^2}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f} \\ & = \frac {\left (2 a^6 c^3\right ) \text {Subst}\left (\int \left (\frac {1}{a^3}-\frac {x^2}{a^2}+\frac {x^4}{a}+3 x^6+a x^8-\frac {1}{a^3 \left (1+a x^2\right )}\right ) \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f} \\ & = -\frac {2 a^3 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^4 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {6 a^6 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}-\frac {2 a^7 c^3 \tan ^9(e+f x)}{9 f (a+a \sec (e+f x))^{9/2}}-\frac {\left (2 a^3 c^3\right ) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f} \\ & = \frac {2 a^{5/2} c^3 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^3 c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^4 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^5 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}-\frac {6 a^6 c^3 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}}-\frac {2 a^7 c^3 \tan ^9(e+f x)}{9 f (a+a \sec (e+f x))^{9/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 2.46 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.63 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx=\frac {2 a^3 c^3 \left (315 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {c}}\right )+\sqrt {c-c \sec (e+f x)} \left (-383-34 \sec (e+f x)+132 \sec ^2(e+f x)+5 \sec ^3(e+f x)-35 \sec ^4(e+f x)\right )\right ) \tan (e+f x)}{315 f \sqrt {a (1+\sec (e+f x))} \sqrt {c-c \sec (e+f x)}} \]

[In]

Integrate[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^3,x]

[Out]

(2*a^3*c^3*(315*Sqrt[c]*ArcTanh[Sqrt[c - c*Sec[e + f*x]]/Sqrt[c]] + Sqrt[c - c*Sec[e + f*x]]*(-383 - 34*Sec[e
+ f*x] + 132*Sec[e + f*x]^2 + 5*Sec[e + f*x]^3 - 35*Sec[e + f*x]^4))*Tan[e + f*x])/(315*f*Sqrt[a*(1 + Sec[e +
f*x])]*Sqrt[c - c*Sec[e + f*x]])

Maple [A] (verified)

Time = 89.61 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.05

method result size
default \(-\frac {2 a^{2} c^{3} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (-315 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \cos \left (f x +e \right )-315 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+383 \sin \left (f x +e \right )+34 \tan \left (f x +e \right )-132 \sec \left (f x +e \right ) \tan \left (f x +e \right )-5 \sec \left (f x +e \right )^{2} \tan \left (f x +e \right )+35 \sec \left (f x +e \right )^{3} \tan \left (f x +e \right )\right )}{315 f \left (\cos \left (f x +e \right )+1\right )}\) \(223\)
parts \(\frac {2 c^{3} a^{2} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (3 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \cos \left (f x +e \right )+3 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+8 \sin \left (f x +e \right )+\tan \left (f x +e \right )\right )}{3 f \left (\cos \left (f x +e \right )+1\right )}-\frac {2 c^{3} a^{2} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (43 \sin \left (f x +e \right )+14 \tan \left (f x +e \right )+3 \sec \left (f x +e \right ) \tan \left (f x +e \right )\right )}{5 f \left (\cos \left (f x +e \right )+1\right )}+\frac {2 c^{3} a^{2} \left (46 \cos \left (f x +e \right )^{3}+23 \cos \left (f x +e \right )^{2}+12 \cos \left (f x +e \right )+3\right ) \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \tan \left (f x +e \right ) \sec \left (f x +e \right )^{2}}{7 f \left (\cos \left (f x +e \right )+1\right )}-\frac {2 c^{3} a^{2} \left (584 \cos \left (f x +e \right )^{4}+292 \cos \left (f x +e \right )^{3}+219 \cos \left (f x +e \right )^{2}+130 \cos \left (f x +e \right )+35\right ) \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \tan \left (f x +e \right ) \sec \left (f x +e \right )^{3}}{315 f \left (\cos \left (f x +e \right )+1\right )}\) \(404\)

[In]

int((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

-2/315*a^2*c^3/f*(a*(sec(f*x+e)+1))^(1/2)/(cos(f*x+e)+1)*(-315*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-cos(f*x+e)/
(cos(f*x+e)+1))^(1/2))*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*cos(f*x+e)-315*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-c
os(f*x+e)/(cos(f*x+e)+1))^(1/2))*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)+383*sin(f*x+e)+34*tan(f*x+e)-132*sec(f*x+e
)*tan(f*x+e)-5*sec(f*x+e)^2*tan(f*x+e)+35*sec(f*x+e)^3*tan(f*x+e))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 441, normalized size of antiderivative = 2.08 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx=\left [\frac {315 \, {\left (a^{2} c^{3} \cos \left (f x + e\right )^{5} + a^{2} c^{3} \cos \left (f x + e\right )^{4}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (383 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} + 34 \, a^{2} c^{3} \cos \left (f x + e\right )^{3} - 132 \, a^{2} c^{3} \cos \left (f x + e\right )^{2} - 5 \, a^{2} c^{3} \cos \left (f x + e\right ) + 35 \, a^{2} c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{315 \, {\left (f \cos \left (f x + e\right )^{5} + f \cos \left (f x + e\right )^{4}\right )}}, -\frac {2 \, {\left (315 \, {\left (a^{2} c^{3} \cos \left (f x + e\right )^{5} + a^{2} c^{3} \cos \left (f x + e\right )^{4}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (383 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} + 34 \, a^{2} c^{3} \cos \left (f x + e\right )^{3} - 132 \, a^{2} c^{3} \cos \left (f x + e\right )^{2} - 5 \, a^{2} c^{3} \cos \left (f x + e\right ) + 35 \, a^{2} c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{315 \, {\left (f \cos \left (f x + e\right )^{5} + f \cos \left (f x + e\right )^{4}\right )}}\right ] \]

[In]

integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^3,x, algorithm="fricas")

[Out]

[1/315*(315*(a^2*c^3*cos(f*x + e)^5 + a^2*c^3*cos(f*x + e)^4)*sqrt(-a)*log((2*a*cos(f*x + e)^2 - 2*sqrt(-a)*sq
rt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 2*
(383*a^2*c^3*cos(f*x + e)^4 + 34*a^2*c^3*cos(f*x + e)^3 - 132*a^2*c^3*cos(f*x + e)^2 - 5*a^2*c^3*cos(f*x + e)
+ 35*a^2*c^3)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^5 + f*cos(f*x + e)^4), -2/
315*(315*(a^2*c^3*cos(f*x + e)^5 + a^2*c^3*cos(f*x + e)^4)*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x +
e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) + (383*a^2*c^3*cos(f*x + e)^4 + 34*a^2*c^3*cos(f*x + e)^3 - 132*a^2*c
^3*cos(f*x + e)^2 - 5*a^2*c^3*cos(f*x + e) + 35*a^2*c^3)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e))
/(f*cos(f*x + e)^5 + f*cos(f*x + e)^4)]

Sympy [F]

\[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx=- c^{3} \left (\int \left (- a^{2} \sqrt {a \sec {\left (e + f x \right )} + a}\right )\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\, dx + \int 2 a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\, dx + \int \left (- 2 a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\right )\, dx + \int \left (- a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{4}{\left (e + f x \right )}\right )\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{5}{\left (e + f x \right )}\, dx\right ) \]

[In]

integrate((a+a*sec(f*x+e))**(5/2)*(c-c*sec(f*x+e))**3,x)

[Out]

-c**3*(Integral(-a**2*sqrt(a*sec(e + f*x) + a), x) + Integral(a**2*sqrt(a*sec(e + f*x) + a)*sec(e + f*x), x) +
 Integral(2*a**2*sqrt(a*sec(e + f*x) + a)*sec(e + f*x)**2, x) + Integral(-2*a**2*sqrt(a*sec(e + f*x) + a)*sec(
e + f*x)**3, x) + Integral(-a**2*sqrt(a*sec(e + f*x) + a)*sec(e + f*x)**4, x) + Integral(a**2*sqrt(a*sec(e + f
*x) + a)*sec(e + f*x)**5, x))

Maxima [F(-1)]

Timed out. \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx=\text {Timed out} \]

[In]

integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^3,x, algorithm="maxima")

[Out]

Timed out

Giac [F]

\[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx=\int { -{\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {5}{2}} {\left (c \sec \left (f x + e\right ) - c\right )}^{3} \,d x } \]

[In]

integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^3,x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^3 \, dx=\int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^3 \,d x \]

[In]

int((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x))^3,x)

[Out]

int((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x))^3, x)